<?php
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
use think\facade\Route;

/**
 * 广告管理 相关路由
 */
Route::group('advert', function () {

    /** 广告 */
    Route::group(function () {
        //获取列表
        Route::get('index', 'v1.advert.Advert/index')->name('index')->option(['real_name' => '获取广告列表']);
        //保存广告
        Route::post('save', 'v1.advert.Advert/save')->name('save')->option(['real_name' => '保存广告']);
        //修改广告
        Route::post('update/:id', 'v1.advert.Advert/save')->name('update')->option(['real_name' => '修改广告']);
        //删除广告
        Route::post('delete/:id', 'v1.advert.Advert/delete')->name('delete')->option(['real_name' => '删除广告']);
        //设置相关
        Route::post('set/:id', 'v1.advert.Advert/set')->name('set')->option(['real_name' => '设置相关']);
    })->option(['parent' => 'advert', 'cate_name' => '广告管理']);

})->middleware([
    \app\http\middleware\AllowOriginMiddleware::class,
    \app\adminapi\middleware\AdminAuthTokenMiddleware::class,
    \app\adminapi\middleware\AdminCheckRoleMiddleware::class,
    \app\adminapi\middleware\AdminLogMiddleware::class
])->option(['mark' => 'advert', 'mark_name' => '广告模块']);